package com.java;

public class Test6 {
    public static void main(String[] args) {
        int a = 10;
        int b = 50;
        int c = a % b;
        while (c != 0)
        {
            a = b;
            b = c;
            c = a % b;
        }
        System.out.println(b);
    }
}
